using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmMasPurchaseMethod")]
    public class MasPurchaseMethod
    {
        public MasPurchaseMethod()
        {
            //this.MasPurchaseMappings = new HashSet<MasPurchaseMapping>();
        }
    
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "IcmPcMethodId", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public int PcMethodId { get; set; }

        [DataMember, Display(Name = "IcmPcMethodName", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public string Name { get; set; }

        [DataMember, Display(Name = "IcmPcMethodDescr", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public string Descr { get; set; }

        [DataMember, Display(Name = "IcmPcMethodReason", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public string Reason { get; set; }

        [DataMember]
        public decimal AmountMin { get; set; }

        [DataMember]
        public decimal AmountMax { get; set; }

        [ForeignKey("MasPurchaseType")]
        [DataMember, Display(Name = "IcmPcTypeId", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public int PcTypeId { get; set; }

		[DataMember, Display(Name = "BiddingStatus", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public bool? IsBid { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.MasPurchaseMethodResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }


        //[DataMember]
        //public virtual ICollection<MasPurchaseMapping> MasPurchaseMappings { get; set; }

        [DataMember]
        public virtual ICM.MasPurchaseType MasPurchaseType { get; set; }

    }
}